<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>合作伙伴LOGO旋转展示</title>
    <script src="https://cdn.jsdelivr.net/npm/gsap@3.13.0/dist/gsap.min.js"></script>
    <style>
        body {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            background: #f5f5f5;
            perspective: 1000px;
            /* 透视效果 */
            margin: 0;
        }

        .logo-container {
            width: 600px;
            height: 400px;
            position: relative;
            transform-style: preserve-3d;
            animation: rotate 20s infinite linear;
        }

        .logo-container img {
            position: absolute;
            width: 120px;
            height: auto;
            top: 50%;
            left: 50%;
            transform-origin: center center;
            transition: transform 0.5s;
        }

        @keyframes rotate {
            from {
                transform: rotateY(0deg) rotateX(0deg);
            }

            to {
                transform: rotateY(360deg) rotateX(20deg);
            }
        }

        .logo {
            width: 300px;
            height: 300px;
            background: skyblue;
            border-radius: 30px;
        }
    </style>
</head>

<body>
    <div class="logo" id="logo">
    </div>
    <div class="logo" id="logo">
    </div>
    <div class="logo" id="logo">
    </div>
    <div class="logo" id="logo">
    </div>
    <div class="logo" id="logo">
    </div>
    <div class="logo" id="logo">
    </div>
    <script>
        const logo = document.querySelectorAll('#logo');
        //gsap.to  从当前状态到动画状态
        gsap.to(logo, {
            y: 250,
            repeat: -1,
            yoyo: true,
            rotation: 360,
            borderRadius: "100%",
            ease: 'power1.inOut',
            stagger: {
                amount: 5,
                from: "center",
                ease: "power1.inOut",
                grid: [2, 1],
                axis: 'y',

            },
        })
    </script>
</body>

</html>